﻿using AutoMapper;
using Oliving.Edge.Dto.Oliving;
using Oliving.Edge.Model;
using Oliving.Edge.Model.Dto;
using Oliving.Edge.Model.Dto.MQXT;
using Oliving.Edge.Model.Dto.User;
using Oliving.Edge.Model.Dto.WY;
using Oliving.Edge.Model.Dto.XLT;
using Oliving.Edge.Model.Models;
using Oliving.Edge.Model.Models.MQXT;
using Oliving.Edge.Model.Models.User;
using Oliving.Edge.Model.Models.XLT;
using Oliving.Edge.Model.ViewModels;
using System;
using System.Collections.Generic;
using System.Text;

namespace Oliving.Edge.PlugIn.AutoMapper
{
    public class CustomProfile : Profile
    {
        /// <summary>
        /// 配置构造函数，用来创建关系映射
        /// </summary>
        public CustomProfile()
        {
            CreateMap<BlogArticle, BlogViewModels>();
            CreateMap<BlogViewModels, BlogArticle>();

            #region Base

            CreateMap<sys_config, Sys_configDto>();
            CreateMap<Sys_configDto, sys_config>();
            CreateMap<PageModel<sys_config>, PageModel<Sys_configDto>>();



            CreateMap<Sys_Dict, Sys_DictDto>();
            CreateMap<Sys_DictDto, Sys_Dict>();
            CreateMap<PageModel<Sys_Dict>, PageModel<Sys_DictDto>>();


            CreateMap<Sys_DataDictionary, Sys_DataDictionaryDto>();
            CreateMap<Sys_DataDictionaryDto, Sys_DataDictionary>();
            CreateMap<PageModel<Sys_DataDictionary>, PageModel<Sys_DataDictionaryDto>>();

            #region MyRegion

            CreateMap<CaiJiQiModelValue, CaiJiQiModelValueDto>();
            CreateMap<CaiJiQiModelValueDto, CaiJiQiModelValue>();
            CreateMap<PageModel<CaiJiQiModelValue>, PageModel<CaiJiQiModelValueDto>>();


            CreateMap<MQXT_CaiJiQiModel, MQXT_CaiJiQiModelDto>();
            CreateMap<MQXT_CaiJiQiModelDto, MQXT_CaiJiQiModel>();
            CreateMap<PageModel<MQXT_CaiJiQiModel>, PageModel<MQXT_CaiJiQiModelDto>>();


            CreateMap<MQXT_DataShowModel, MQXT_DataShowModelDto>();
            CreateMap<MQXT_DataShowModelDto, MQXT_DataShowModel>();
            CreateMap<PageModel<MQXT_DataShowModel>, PageModel<MQXT_DataShowModelDto>>();


            CreateMap<MQXT_JiZhongQiModel, MQXT_JiZhongQiModelDto>();
            CreateMap<MQXT_JiZhongQiModelDto, MQXT_JiZhongQiModel>();
            CreateMap<PageModel<MQXT_JiZhongQiModel>, PageModel<MQXT_JiZhongQiModelDto>>();


            #endregion
            #endregion


            CreateMap<Sys_Dept, Sys_DeptDto>();
            CreateMap<Sys_DeptDto, Sys_Dept>();
            CreateMap<PageModel<Sys_Dept>, PageModel<Sys_DeptDto>>();      



            #region  效率通



            CreateMap<WY_Company, WY_CompanyDto>();
            CreateMap<WY_CompanyDto, WY_Company>();
            CreateMap<PageModel<WY_Company>, PageModel<WY_CompanyDto>>();

            CreateMap<WY_Project, WY_ProjectDto>();
            CreateMap<WY_ProjectDto, WY_Project>();
            CreateMap<PageModel<WY_Project>, PageModel<WY_ProjectDto>>();

            CreateMap<Base_EquipmentCategory, Base_EquipmentCategoryDto>();
            CreateMap<Base_EquipmentCategoryDto, Base_EquipmentCategory>();
            CreateMap<PageModel<Base_EquipmentCategory>, PageModel<Base_EquipmentCategoryDto>>();

            //设备
            CreateMap<Base_Equipment, Base_EquipmentDto>();
            CreateMap<Base_EquipmentDto, Base_Equipment>();
            CreateMap<PageModel<Base_Equipment>, PageModel<Base_EquipmentDto>>();


            #endregion


        }
    }
}
